home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / catman / p_man / cat3 / qapplication.Z / qapplication
Encoding:
Text File  |  1998-10-28  |  71.7 KB  |  1,387 lines

  1.  
  2.  
  3.  
  4.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       QApplication - Manages the application event queue
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       #include <qapplication.h>
  13.  
  14.       Inherits QObject.
  15.  
  16.       Inherited by QXtApplication.
  17.  
  18.     PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrrssss
  19.       QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn (((( iiiinnnntttt &&&& _a_r_g_c,,,, cccchhhhaaaarrrr ******** aaaarrrrggggvvvv ))))
  20.       vvvviiiirrrrttttuuuuaaaallll ~~~~QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn    ()
  21.       iiiinnnntttt aaaarrrrggggcccc (((()))) ccccoooonnnnsssstttt
  22.       cccchhhhaaaarrrr******** aaaarrrrggggvvvv (((()))) ccccoooonnnnsssstttt
  23.       QQQQWWWWiiiiddddggggeeeetttt**** mmmmaaaaiiiinnnnWWWWiiiiddddggggeeeetttt (((()))) ccccoooonnnnsssstttt
  24.       vvvvooooiiiidddd sssseeeettttMMMMaaaaiiiinnnnWWWWiiiiddddggggeeeetttt (((( QQQQWWWWiiiiddddggggeeeetttt **** ))))
  25.       QQQQWWWWiiiiddddggggeeeetttt**** ffffooooccccuuuussssWWWWiiiiddddggggeeeetttt (((()))) ccccoooonnnnsssstttt
  26.       iiiinnnntttt eeeexxxxeeeecccc (((())))
  27.       vvvvooooiiiidddd pppprrrroooocccceeeessssssssEEEEvvvveeeennnnttttssss (((())))
  28.       vvvvooooiiiidddd pppprrrroooocccceeeessssssssEEEEvvvveeeennnnttttssss (((( iiiinnnntttt mmmmaaaaxxxxttttiiiimmmmeeee ))))
  29.       vvvvooooiiiidddd pppprrrroooocccceeeessssssssOOOOnnnneeeeEEEEvvvveeeennnntttt (((())))
  30.       iiiinnnntttt eeeennnntttteeeerrrr____lllloooooooopppp (((())))
  31.       vvvvooooiiiidddd eeeexxxxiiiitttt____lllloooooooopppp (((())))
  32.       vvvviiiirrrrttttuuuuaaaallll bbbboooooooollll nnnnoooottttiiiiffffyyyy ((((    QQQQOOOObbbbjjjjeeeecccctttt    ****,,,, QQQQEEEEvvvveeeennnntttt **** ))))
  33.  
  34.     PPPPuuuubbbblllliiiicccc SSSSlllloooottttssss
  35.       vvvvooooiiiidddd qqqquuuuiiiitttt (((())))
  36.  
  37.     SSSSiiiiggggnnnnaaaallllssss
  38.       vvvvooooiiiidddd llllaaaassssttttWWWWiiiinnnnddddoooowwwwCCCClllloooosssseeeedddd    (((())))
  39.  
  40.     SSSSttttaaaattttiiiicccc PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrrssss
  41.       GGGGUUUUIIIISSSSttttyyyylllleeee ssssttttyyyylllleeee (((())))
  42.       vvvvooooiiiidddd sssseeeettttSSSSttttyyyylllleeee    (((( GGGGUUUUIIIISSSSttttyyyylllleeee ))))
  43.       iiiinnnntttt ccccoooolllloooorrrrSSSSppppeeeecccc    (((())))
  44.       vvvvooooiiiidddd sssseeeettttCCCCoooolllloooorrrrSSSSppppeeeecccc (((( iiiinnnntttt ))))
  45.       QQQQCCCCuuuurrrrssssoooorrrr**** oooovvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((())))
  46.       vvvvooooiiiidddd sssseeeettttOOOOvvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((( ccccoooonnnnsssstttt QQQQCCCCuuuurrrrssssoooorrrr &&&&,,,, bbbboooooooollll _r_e_p_l_a_c_e====FFFFAAAALLLLSSSSEEEE
  47.           ))))
  48.       vvvvooooiiiidddd rrrreeeessssttttoooorrrreeeeOOOOvvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((())))
  49.       bbbboooooooollll hhhhaaaassssGGGGlllloooobbbbaaaallllMMMMoooouuuusssseeeeTTTTrrrraaaacccckkkkiiiinnnngggg (((())))
  50.       vvvvooooiiiidddd sssseeeettttGGGGlllloooobbbbaaaallllMMMMoooouuuusssseeeeTTTTrrrraaaacccckkkkiiiinnnngggg ((((    bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
  51.       QQQQPPPPaaaalllleeeetttttttteeee**** ppppaaaalllleeeetttttttteeee (((())))
  52.       vvvvooooiiiidddd sssseeeettttPPPPaaaalllleeeetttttttteeee (((( ccccoooonnnnsssstttt QQQQPPPPaaaalllleeeetttttttteeee &&&&,,,, bbbboooooooollll
  53.           _u_p_d_a_t_e_A_l_l_W_i_d_g_e_t_s====FFFFAAAALLLLSSSSEEEE ))))
  54.       QQQQFFFFoooonnnntttt**** ffffoooonnnntttt (((())))
  55.       vvvvooooiiiidddd sssseeeettttFFFFoooonnnntttt (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&&,,,,    bbbboooooooollll _u_p_d_a_t_e_A_l_l_W_i_d_g_e_t_s====FFFFAAAALLLLSSSSEEEE ))))
  56.       QQQQFFFFoooonnnnttttMMMMeeeettttrrrriiiiccccssss ffffoooonnnnttttMMMMeeeettttrrrriiiiccccssss (((())))
  57.       QQQQWWWWiiiiddddggggeeeettttLLLLiiiisssstttt**** aaaallllllllWWWWiiiiddddggggeeeettttssss (((())))
  58.       QQQQWWWWiiiiddddggggeeeettttLLLLiiiisssstttt**** ttttooooppppLLLLeeeevvvveeeellllWWWWiiiiddddggggeeeettttssss (((())))
  59.       QQQQWWWWiiiiddddggggeeeetttt**** ddddeeeesssskkkkttttoooopppp (((())))
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 9/22/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  71.  
  72.  
  73.  
  74.       QQQQWWWWiiiiddddggggeeeetttt**** aaaaccccttttiiiivvvveeeePPPPooooppppuuuuppppWWWWiiiiddddggggeeeetttt (((())))
  75.       QQQQWWWWiiiiddddggggeeeetttt**** aaaaccccttttiiiivvvveeeeMMMMooooddddaaaallllWWWWiiiiddddggggeeeetttt (((())))
  76.       QQQQCCCClllliiiippppbbbbooooaaaarrrrdddd**** cccclllliiiippppbbbbooooaaaarrrrdddd    (((())))
  77.       QQQQWWWWiiiiddddggggeeeetttt**** wwwwiiiiddddggggeeeettttAAAAtttt (((( iiiinnnntttt _x,,,, iiiinnnntttt _y,,,, bbbboooooooollll _c_h_i_l_d
  78.       QQQQWWWWiiiiddddggggeeeetttt**** wwwwiiiiddddggggeeeettttAAAAtttt (((( ccccoooonnnnsssstttt QQQQPPPPooooiiiinnnntttt &&&&,,,, bbbboooooooollll _c_h_i_l_d====FFFFAAAALLLLSSSSEEEE ))))
  79.       vvvvooooiiiidddd eeeexxxxiiiitttt (((( iiiinnnntttt _r_e_t_c_o_d_e====0000 ))))
  80.       bbbboooooooollll sssseeeennnnddddEEEEvvvveeeennnntttt (((( QQQQOOOObbbbjjjjeeeecccctttt **** _r_e_c_e_i_v_e_r,,,, QQQQEEEEvvvveeeennnntttt ****    eeeevvvveeeennnntttt ))))
  81.       vvvvooooiiiidddd ppppoooossssttttEEEEvvvveeeennnntttt (((( QQQQOOOObbbbjjjjeeeecccctttt **** _r_e_c_e_i_v_e_r,,,, QQQQEEEEvvvveeeennnntttt ****    eeeevvvveeeennnntttt ))))
  82.       vvvvooooiiiidddd sssseeeennnnddddPPPPoooosssstttteeeeddddEEEEvvvveeeennnnttttssss    (((( QQQQOOOObbbbjjjjeeeecccctttt **** _r_e_c_e_i_v_e_r,,,, iiiinnnntttt eeeevvvveeeennnntttt____ttttyyyyppppeeee ))))
  83.       bbbboooooooollll ssssttttaaaarrrrttttiiiinnnnggggUUUUpppp (((())))
  84.       bbbboooooooollll cccclllloooossssiiiinnnnggggDDDDoooowwwwnnnn (((())))
  85.       vvvvooooiiiidddd fffflllluuuusssshhhhXXXX (((())))
  86.       vvvvooooiiiidddd ssssyyyynnnnccccXXXX (((())))
  87.       vvvvooooiiiidddd bbbbeeeeeeeepppp (((())))
  88.       vvvvooooiiiidddd sssseeeettttWWWWiiiinnnnSSSSttttyyyylllleeeeHHHHiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr (((( ccccoooonnnnsssstttt QQQQCCCCoooolllloooorrrr    &&&& ))))
  89.       ccccoooonnnnsssstttt    QQQQCCCCoooolllloooorrrr&&&&    wwwwiiiinnnnSSSSttttyyyylllleeeeHHHHiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr (((())))
  90.       vvvvooooiiiidddd sssseeeettttDDDDoooouuuubbbblllleeeeCCCClllliiiicccckkkkIIIInnnntttteeeerrrrvvvvaaaallll ((((    iiiinnnntttt ))))
  91.       iiiinnnntttt ddddoooouuuubbbblllleeeeCCCClllliiiicccckkkkIIIInnnntttteeeerrrrvvvvaaaallll (((())))
  92.  
  93.      RRRREEEELLLLAAAATTTTEEEEDDDD FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  94.       (Note    that these are not member functions.)
  95.       vvvvooooiiiidddd qqqqAAAAddddddddPPPPoooossssttttRRRRoooouuuuttttiiiinnnneeee ((((CCCClllleeeeaaaannnnUUUUppppFFFFuuuunnnnccccttttiiiioooonnnn    _p))))
  96.       ccccoooonnnnsssstttt    cccchhhhaaaarrrr **** qqqqVVVVeeeerrrrssssiiiioooonnnn    (((())))
  97.       bbbboooooooollll qqqqSSSSyyyyssssIIIInnnnffffoooo    ((((iiiinnnntttt **** _w_o_r_d_S_i_z_e,,,, bbbboooooooollll ****    _b_i_g_E_n_d_i_a_n))))
  98.       vvvvooooiiiidddd ddddeeeebbbbuuuugggg ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _m_s_g,,,,    ............))))
  99.       vvvvooooiiiidddd wwwwaaaarrrrnnnniiiinnnngggg ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _m_s_g,,,, ............))))
  100.       vvvvooooiiiidddd ffffaaaattttaaaallll ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _m_s_g,,,,    ............))))
  101.       vvvvooooiiiidddd AAAASSSSSSSSEEEERRRRTTTT ((((bbbboooooooollll _t_e_s_t))))
  102.       vvvvooooiiiidddd CCCCHHHHEEEECCCCKKKK____PPPPTTTTRRRR ((((vvvvooooiiiidddd **** _p))))
  103.       mmmmssssgggg____hhhhaaaannnnddddlllleeeerrrr qqqqIIIInnnnssssttttaaaallllllllMMMMssssggggHHHHaaaannnnddddlllleeeerrrr ((((mmmmssssgggg____hhhhaaaannnnddddlllleeeerrrr _h))))
  104.  
  105.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  106.       The QApplication class manages the application event queue.
  107.  
  108.       The QApplication class is central to Qt. It receives events
  109.       from the underlying window system and    sends them to the
  110.       destination widgets. An application object must be created
  111.       before any widgets can be created!
  112.  
  113.       Only one single QApplication object should be    created. In
  114.       fact Qt complains if you create more than one, and this is
  115.       normally done    in the main() function.    Once a QApplication
  116.       object has been created, qApp    (defined as extern
  117.       QApplication *qApp) refers to    this object.
  118.  
  119.       Example (a complete Qt application):
  120.  
  121.           #include <qapplication.h>                  // defines QApplication
  122.           #include <qpushbutton.h>              // defines QPushButton
  123.           int main(    int argc, char **argv )
  124.           {
  125.           QApplication app( argc, argv );      // create application    object
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 9/22/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  137.  
  138.  
  139.  
  140.           QPushButton  hello( "Hello, world!" );  // create a push button
  141.           app.setMainWidget( &hello );          // define as main widget
  142.           connect( &hello, SIGNAL(clicked()),      // clicking the button
  143.                &app, SLOT(quit()) );      //   quits the application
  144.           hello.show();                  // show button
  145.           return app.exec();              // run main event loop
  146.           }
  147.  
  148.       IIIImmmmppppoooorrrrttttaaaannnntttt
  149.       Notice that the QApplication object must be created before
  150.       any window-system functionality of Qt    is used, this includes
  151.       widgets, colors, fonts etc.
  152.  
  153.       Note also that for X11, setMainWidget() may change the main
  154.       widget according to the -_g_e_o_m_e_t_r_y option. To preserve    this
  155.       functionality, you must set your defaults before
  156.       setMainWidget() and any overrides after.
  157.  
  158.       While    Qt is not optimized or designed    for writing non-GUI
  159.       programs, it's possible to use some of its classes without
  160.       creating a QApplication. This    can be very useful if you wish
  161.       to share code    between    a non-GUI server and a GUI client.
  162.  
  163.       Examples:  forever/forever.cpp desktop/desktop.cpp
  164.       connect/connect.cpp drawdemo/drawdemo.cpp movies/main.cpp
  165.       picture/picture.cpp xform/xform.cpp menu/menu.cpp
  166.       progress/progress.cpp    cursor/cursor.cpp layout/layout.cpp
  167.       qmag/qmag.cpp    widgets/widgets.cpp
  168.  
  169.      MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  170.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn    (((( iiiinnnntttt &&&&    aaaarrrrggggcccc,,,, cccchhhhaaaarrrr ******** aaaarrrrggggvvvv ))))
  171.       Initializes the window system    and onstructs an application
  172.       object with the command line arguments _a_r_g_c and _a_r_g_v.
  173.  
  174.       The global qApp pointer refers to this application object.
  175.       Only one application object should be    created.
  176.  
  177.       This application object must be constructed before any paint
  178.       devices (includes widgets, pixmaps, bitmaps etc.)
  179.  
  180.       Notice that _a_r_g_c and _a_r_g_v might be changed. Qt removes
  181.       command line arguments that it recognizes. _a_r_g_c and _a_r_g_v are
  182.       can be accessed later    by qApp->argc()    and qApp->argv(). The
  183.       documentation    for argv() contains a detailed description of
  184.       how to process command line arguments.
  185.  
  186.       Qt debugging options:
  187.  
  188.       -nograb, tells Qt to never grab the mouse or the keyboard.
  189.  
  190.      debugging.
  191.       -sync    (only under X11), switches to synchronous mode for
  192.  
  193.  
  194.  
  195.      Page 3                         (printed 9/22/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  203.  
  204.  
  205.  
  206.       See Debugging    Techniques for a more detailed explanation.
  207.  
  208.       The X11 version of Qt    supports a few more command line
  209.       options:
  210.  
  211.       -display _d_i_s_p_l_a_y, sets the X display (default    is $DISPLAY).
  212.  
  213.       -
  214.            geometry    _g_e_o_m_e_t_r_y, sets the client geometry of the main widget.
  215.  
  216.       -fn or -font _f_o_n_t, defines the application font.
  217.  
  218.      an    application palette (light and dark shades are calculated).
  219.       -bg or -
  220.            background _c_o_l_o_r, sets the default background color and
  221.  
  222.       -fg or -foreground _c_o_l_o_r, sets the default foreground    color.
  223.  
  224.       -name    _n_a_m_e, sets the application name.
  225.  
  226.       -title _t_i_t_l_e,    sets the application title (caption).
  227.  
  228.      are motif and windows
  229.       -
  230.            style= _s_t_y_l_e, sets the application GUI style. Possible values
  231.  
  232.      visual on an 8-bit    display.
  233.       -visual TrueColor, forces the    application to use a TrueColor
  234.  
  235.      cube on a 8-bit display, if the application is using the
  236.      QApplication::ManyColor color specification. If _c_o_u_n_t is 216 then
  237.      a 6x6x6 color cube    is used    (ie. 6 levels of red, 6    of green, and
  238.      6 of blue); for 108, a 3x3x3, and for other values, a cube
  239.      approximately proportional    to a 2x3x1 cube    is used.
  240.       -
  241.            ncols _c_o_u_n_t, limits the number of colors    allocated in the color
  242.  
  243.      an    8-bit display.
  244.       -
  245.            cmap, causes the    application to install a private color map on
  246.  
  247.       See also: argc() and argv().
  248.  
  249.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::~~~~QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn (((()))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
  250.       Deletes all remaining    widgets    and cleans up any window
  251.       system resources that    were allocated by this application.
  252.       Sets the global variable qApp    to null.
  253.  
  254.      QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::aaaaccccttttiiiivvvveeeeMMMMooooddddaaaallllWWWWiiiiddddggggeeeetttt (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  255.       Returns the active modal widget.
  256.  
  257.       A modal widget is a special top level    widget which is    a
  258.  
  259.  
  260.  
  261.      Page 4                         (printed 9/22/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  269.  
  270.  
  271.  
  272.       subclass of QDialog that specifies the modal parameter of
  273.       the constructor to TRUE. A modal widget must be finished
  274.       before the user can continue with other parts    of the
  275.       program.
  276.  
  277.       The modal widgets are    organized in a stack. This function
  278.       returns the active modal widget on top of the    stack.
  279.  
  280.       See also: currentPopupWidget() and topLevelWidgets().
  281.  
  282.      QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::aaaaccccttttiiiivvvveeeePPPPooooppppuuuuppppWWWWiiiiddddggggeeeetttt (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  283.       Returns the active popup widget.
  284.  
  285.       A popup widget is a special top level    widget that sets the
  286.       WType_Popup widget flag, e.g.    the QPopupMenu widget. When
  287.       the application opens    a popup    widget,    all events are sent to
  288.       the popup and    normal widgets and modal widgets cannot    be
  289.       accessed before the popup widget is closed.
  290.  
  291.       Only other popup widgets may be opened when a    popup widget
  292.       is shown. The    popup widgets are organized in a stack.    This
  293.       function returns the active popup widget on top of the
  294.       stack.
  295.  
  296.       See also: currentModalWidget() and topLevelWidgets().
  297.  
  298.      QQQQWWWWiiiiddddggggeeeettttLLLLiiiisssstttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::aaaallllllllWWWWiiiiddddggggeeeettttssss (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  299.       Returns a list of all    the widgets in the application.
  300.  
  301.       The list is created using new    and must be deleted by the
  302.       caller.
  303.  
  304.       The list is empty if there are no widgets.
  305.  
  306.       Note that some of the    widgets    may be hidden.
  307.  
  308.       Example:
  309.  
  310.           //
  311.           // Updates all widgets.
  312.           //
  313.           QWidgetList  *list = QApplication::allWidgets();
  314.           QWidgetListIt it(    *list );      // iterate over the widgets
  315.           while ( it.current() ) {          // for each top level    widget...
  316.           it.current()->update();
  317.           ++it;
  318.           }
  319.           delete list;              // delete the    list, not the widgets
  320.  
  321.       The QWidgetList class    is defined in the qwidcoll.h header
  322.       file.
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                         (printed 9/22/98)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  335.  
  336.  
  337.  
  338.       WWWWaaaarrrrnnnniiiinnnngggg:::: Delete the list away    as soon    you have finished
  339.       using    it. You    can get    in serious trouble if you for instance
  340.       try to access    a widget that has been deleted.
  341.  
  342.       See also: topLevelWidgets(), QWidget::isVisible() and
  343.       QList::isEmpty(),.
  344.  
  345.      iiiinnnntttt QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::aaaarrrrggggcccc (((()))) ccccoooonnnnsssstttt
  346.       Returns the number of    command    line arguments.
  347.  
  348.       The documentation for    argv() contains    a detailed description
  349.       of how to process command line arguments.
  350.  
  351.       See also: argv() and QApplication::QApplication().
  352.  
  353.      cccchhhhaaaarrrr ******** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::aaaarrrrggggvvvv    (((()))) ccccoooonnnnsssstttt
  354.       Returns the command line argument vector.
  355.  
  356.       argv()[0] is the program name, argv()[1] is the first
  357.       argument and argv()[argc()-1]    is the last argument.
  358.  
  359.       A QApplication object    is constructed by passing _a_r_g_c and
  360.       _a_r_g_v from the    main() function. Some of the arguments may be
  361.       recognized as    Qt options removed from    the argument vector.
  362.       For example, the X11 version of Qt knows about -display,
  363.       -font    and a few more options.
  364.  
  365.       Example:
  366.  
  367.           // showargs.cpp -    displays program arguments in a    list box
  368.           #include <qapplication.h>
  369.           #include <qlistbox.h>
  370.           int main(    int argc, char **argv )
  371.           {
  372.           QApplication a( argc,    argv );
  373.           QListBox b;
  374.           a.setMainWidget( &b );
  375.           for (    int i=0; i<a.argc(); i++ )      // a.argc() == argc
  376.               b.insertItem( a.argv()[i]    );      // a.argv()[i] == argv[i]
  377.           b.show();
  378.           return a.exec();
  379.           }
  380.  
  381.       If you run showargs -display unix:0 -font 9x15bold hello
  382.       world    under X11, the list box    contains the three strings
  383.       "showargs", "hello" and "world".
  384.  
  385.       See also: argc() and QApplication::QApplication().
  386.  
  387.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::bbbbeeeeeeeepppp (((())))    [[[[ssssttttaaaattttiiiicccc]]]]
  388.       Sounds the bell, using the default volume and    sound.
  389.  
  390.  
  391.  
  392.  
  393.      Page 6                         (printed 9/22/98)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  401.  
  402.  
  403.  
  404.      QQQQCCCClllliiiippppbbbbooooaaaarrrrdddd    **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::cccclllliiiippppbbbbooooaaaarrrrdddd (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  405.       Returns a pointer to the application global clipboard.
  406.  
  407.      bbbboooooooollll QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::cccclllloooossssiiiinnnnggggDDDDoooowwwwnnnn (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  408.       Returns TRUE if the application objects are being destroyed.
  409.  
  410.       See also: startingUp().
  411.  
  412.      iiiinnnntttt QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ccccoooolllloooorrrrSSSSppppeeeecccc (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  413.       Returns the color specification.
  414.  
  415.       See also: QApplication::setColorSpec().
  416.  
  417.       Examples:  showimg/showimg.cpp
  418.  
  419.      QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ddddeeeesssskkkkttttoooopppp (((())))    [[[[ssssttttaaaattttiiiicccc]]]]
  420.       Returns the desktop widget (also called the root window).
  421.  
  422.       The desktop widget is    useful for obtaining the size of the
  423.       screen. It can also be used to draw on the desktop.
  424.  
  425.           QWidget *d = QApplication::desktop();
  426.           int w=d->width();              // returns screen width
  427.           int h=d->height();          // returns screen height
  428.           d->setBackgroundColor( red );      // makes desktop red
  429.  
  430.       Examples:  qmag/qmag.cpp
  431.  
  432.      iiiinnnntttt QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ddddoooouuuubbbblllleeeeCCCClllliiiicccckkkkIIIInnnntttteeeerrrrvvvvaaaallll (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  433.       Returns the maximum duration for a double click.
  434.  
  435.       See also: setDoubleClickInterval().
  436.  
  437.      iiiinnnntttt QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::eeeennnntttteeeerrrr____lllloooooooopppp (((())))
  438.       This function    enters the main    event loop (recursively). Do
  439.       not call it unless you are an    expert.
  440.  
  441.       See also: exit_loop().
  442.  
  443.      iiiinnnntttt QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::eeeexxxxeeeecccc (((())))
  444.       Enters the main event    loop and waits until exit() is called
  445.       or the main widget is    destroyed. Returns the value that was
  446.       specified to exit(), which is    0 if exit() is called via
  447.       quit().
  448.  
  449.       It is    necessary to call this function    to start event
  450.       handling. The    main event loop    receives events    from the
  451.       window system    and dispatches these to    the application
  452.       widgets.
  453.  
  454.       Generally, no    user interaction can take place    before calling
  455.       exec(). As a special case, modal widgets like    QMessageBox
  456.  
  457.  
  458.  
  459.      Page 7                         (printed 9/22/98)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  467.  
  468.  
  469.  
  470.       can be used before calling exec(), because modal widget have
  471.       a local event    loop.
  472.  
  473.       See also: quit(), exit(), processEvents() and
  474.       setMainWidget().
  475.  
  476.       Examples:  forever/forever.cpp connect/connect.cpp
  477.       mainlyQt/editor.cpp drawdemo/drawdemo.cpp movies/main.cpp
  478.       picture/picture.cpp xform/xform.cpp menu/menu.cpp
  479.       progress/progress.cpp    cursor/cursor.cpp layout/layout.cpp
  480.       qmag/qmag.cpp    widgets/widgets.cpp
  481.  
  482.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::eeeexxxxiiiitttt (((( iiiinnnntttt rrrreeeettttccccooooddddeeee====0000 )))) [[[[ssssttttaaaattttiiiicccc]]]]
  483.       Tells    the application    to exit    with a return code.
  484.  
  485.       After    this function has been called, the application leaves
  486.       the main event loop and returns from the call    to exec(). The
  487.       exec() function returns _r_e_t_c_o_d_e.
  488.  
  489.       By convention, _r_e_t_c_o_d_e 0 means success, any non-zero value
  490.       indicates an error.
  491.  
  492.       Note that unlike the C library exit function,    this function
  493.       _d_o_e_s returns to the caller - it is event processing that
  494.       stops.
  495.  
  496.       See also: quit() and exec().
  497.  
  498.       Examples:  picture/picture.cpp
  499.  
  500.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::eeeexxxxiiiitttt____lllloooooooopppp (((())))
  501.       This function    leaves from a recursive    call to    the main event
  502.       loop.    Do not call it unless you are an expert.
  503.  
  504.       See also: enter_loop().
  505.  
  506.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::fffflllluuuusssshhhhXXXX (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  507.       Flushes the X    event queue in the X11 implementation. Does
  508.       nothing on other platforms.
  509.  
  510.       See also: syncX().
  511.  
  512.      QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ffffooooccccuuuussssWWWWiiiiddddggggeeeetttt (((()))) ccccoooonnnnsssstttt
  513.       Returns the application widget that has the keyboard input
  514.       focus, or null if no application widget has the focus.
  515.  
  516.       See also: QWidget::setFocus()    and QWidget::hasFocus().
  517.  
  518.      QQQQFFFFoooonnnntttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ffffoooonnnntttt    (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  519.       Returns the default application font.    There is always    an
  520.       application font, i.e. the returned pointer is guaranteed to
  521.       be non-null.
  522.  
  523.  
  524.  
  525.      Page 8                         (printed 9/22/98)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  533.  
  534.  
  535.  
  536.       See also: setFont(), fontMetrics() and QWidget::font().
  537.  
  538.      QQQQFFFFoooonnnnttttMMMMeeeettttrrrriiiiccccssss QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ffffoooonnnnttttMMMMeeeettttrrrriiiiccccssss (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  539.       Returns display (screen) font    metrics    for the    application
  540.       font.
  541.  
  542.       See also: font(), setFont(), QWidget::fontMetrics() and
  543.       QPainter::fontMetrics().
  544.  
  545.      bbbboooooooollll QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::hhhhaaaassssGGGGlllloooobbbbaaaallllMMMMoooouuuusssseeeeTTTTrrrraaaacccckkkkiiiinnnngggg (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  546.       Returns TRUE if global mouse tracking    is enabled, otherwise
  547.       FALSE.
  548.  
  549.       See also: setGlobalMouseTracking().
  550.  
  551.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::llllaaaassssttttWWWWiiiinnnnddddoooowwwwCCCClllloooosssseeeedddd (((()))) [[[[ssssiiiiggggnnnnaaaallll]]]]
  552.       This signal is emitted when the user has closed a top    level
  553.       widget and there are no more visible top level widgets left.
  554.  
  555.       The signal is    very useful when your application has many top
  556.       level    widgets    but no main widget. You    can then connect it to
  557.       the quit() slot.
  558.  
  559.       See also: mainWidget(), topLevelWidgets() and
  560.       QWidget::isTopLevel().
  561.  
  562.      QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::mmmmaaaaiiiinnnnWWWWiiiiddddggggeeeetttt    (((()))) ccccoooonnnnsssstttt
  563.       Returns the main application widget, or 0 if there is    not a
  564.       defined main widget.
  565.  
  566.       See also: setMainWidget().
  567.  
  568.      bbbboooooooollll QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::nnnnoooottttiiiiffffyyyy (((( QQQQOOOObbbbjjjjeeeecccctttt **** rrrreeeecccceeeeiiiivvvveeeerrrr,,,, QQQQEEEEvvvveeeennnntttt **** eeeevvvveeeennnntttt ))))
  569.       [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
  570.       Sends    _e_v_e_n_t to _r_e_c_e_i_v_e_r: receiver->event( event ) Returns
  571.       the value that is returned from the receiver's event
  572.       handler.
  573.  
  574.       Reimplementing this virtual function is one of five ways to
  575.       process an event:
  576.  
  577.       1    Reimplementing this function. Very powerful, you    get
  578.            _c_o_m_p_l_e_t_e    control, but of    course only one    subclass can
  579.            be qApp.
  580.  
  581.       2    Installing an event filter on qApp. Such    an event
  582.            filter gets to process all events for all widgets, so
  583.            it's just as powerful as    reimplementing notify(), and
  584.            in this way it's    possible to have more than one
  585.            application-global event    filter.    Global event filter
  586.            get to see even mouse events for    disabled widgets, and
  587.            if global mouse tracking    is enabled, mouse move events
  588.  
  589.  
  590.  
  591.      Page 9                         (printed 9/22/98)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  599.  
  600.  
  601.  
  602.            for all widgets.
  603.  
  604.       3    Reimplementing QObject::event() (as QWidget does). If
  605.            you do this you get tab key-presses, and    you get    to see
  606.            the events before any widget-specific event filters.
  607.  
  608.       4    Installing an event filter on the object. Such an even
  609.            filter gets all the events except Tab and Shift-Tab key
  610.            presses.
  611.  
  612.       5    Finally,    reimplementing paintEvent(), mousePressEvent()
  613.            and so on. This is the normal, easist and least
  614.            powerful    way.
  615.  
  616.       See also: QObject::event() and installEventFilter().
  617.  
  618.      QQQQCCCCuuuurrrrssssoooorrrr **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::oooovvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  619.       Returns the active application override cursor.
  620.  
  621.       This function    returns    0 if no    application cursor has been
  622.       defined (i.e.    the internal cursor stack is empty).
  623.  
  624.       See also: setOverrideCursor()    and restoreOverrideCursor().
  625.  
  626.      QQQQPPPPaaaalllleeeetttttttteeee ****    QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ppppaaaalllleeeetttttttteeee (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  627.       Returns a pointer to the default application palette.    There
  628.       is always an application palette, i.e. the returned pointer
  629.       is guaranteed    to be non-null.
  630.  
  631.       See also: setPalette() and QWidget::palette().
  632.  
  633.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ppppoooossssttttEEEEvvvveeeennnntttt (((( QQQQOOOObbbbjjjjeeeecccctttt **** rrrreeeecccceeeeiiiivvvveeeerrrr,,,,    QQQQEEEEvvvveeeennnntttt **** eeeevvvveeeennnntttt
  634.       )))) [[[[ssssttttaaaattttiiiicccc]]]]
  635.       Stores the event in a    queue and returns immediatly.
  636.  
  637.       The event must be allocated on the heap, as it is deleted
  638.       when the event has been posted.
  639.  
  640.       When control returns to the main event loop, all events that
  641.       are stored in    the queue will be sent using the notify()
  642.       function.
  643.  
  644.       See also: sendEvent().
  645.  
  646.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::pppprrrroooocccceeeessssssssEEEEvvvveeeennnnttttssss (((())))
  647.       Processes pending events, for    3 seconds or until there are
  648.       no more events to process, then return.
  649.  
  650.       You can call this function occasionally when your program is
  651.       busy doing a long operation (e.g. copying a file).
  652.  
  653.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::pppprrrroooocccceeeessssssssEEEEvvvveeeennnnttttssss ((((    iiiinnnntttt mmmmaaaaxxxxttttiiiimmmmeeee ))))
  654.  
  655.  
  656.  
  657.      PPPPaaaaggggeeee 11110000                         ((((pppprrrriiiinnnntttteeeedddd 9999////22222222////99998888))))
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  665.  
  666.  
  667.  
  668.       Processes pending events, for    _m_a_x_t_i_m_e    milliseconds or    until
  669.       there    are no more events to process, then return.
  670.  
  671.       You can call this function occasionally when you program is
  672.       busy doing a long operation (e.g. copying a file).
  673.  
  674.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::pppprrrroooocccceeeessssssssOOOOnnnneeeeEEEEvvvveeeennnntttt    (((())))
  675.       Waits    for an event to    occur, processes it, then returns.
  676.  
  677.       This function    is useful for adapting Qt to situations    where
  678.       the event processing must be grafted into existing program
  679.       loops. Beware    that using this    function in new    applications
  680.       may be an indication of design problems.
  681.  
  682.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::qqqquuuuiiiitttt (((())))    [[[[ssssllllooootttt]]]]
  683.       Tells    the application    to exit    with return code 0 (success).
  684.       Equivalent to    calling    QApplication::exit( 0 ).
  685.  
  686.       This function    is a slot, i.e.    you may    connect    any signal to
  687.       activate quit().
  688.  
  689.       Example:
  690.  
  691.           QPushButton *quitButton =    new QPushButton( "Quit"    );
  692.           connect( quitButton, SIGNAL(clicked()), qApp, SLOT(quit()) );
  693.  
  694.       See also: exit().
  695.  
  696.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::rrrreeeessssttttoooorrrreeeeOOOOvvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  697.       Restores the effect of setOverrideCursor().
  698.  
  699.       If setOverrideCursor() has been called twice,    calling
  700.       restoreOverrideCursor() will activate    the first cursor set.
  701.       Calling this function    a second time restores the original
  702.       widgets cursors.
  703.  
  704.       Application cursors are stored on an internal    stack.
  705.       setOverrideCursor() pushes the cursor    onto the stack,    and
  706.       restoreOverrideCursor() pops the active cursor off the
  707.       stack. Every setOverrideCursor() must    have an    corresponding
  708.       restoreOverrideCursor(), otherwise the stack will get    out of
  709.       sync.    overrideCursor() returns 0 if the cursor stack is
  710.       empty.
  711.  
  712.       See also: setOverrideCursor()    and overrideCursor().
  713.  
  714.       Examples:  showimg/showimg.cpp
  715.  
  716.      bbbboooooooollll QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeennnnddddEEEEvvvveeeennnntttt (((( QQQQOOOObbbbjjjjeeeecccctttt **** rrrreeeecccceeeeiiiivvvveeeerrrr,,,,    QQQQEEEEvvvveeeennnntttt **** eeeevvvveeeennnntttt
  717.       )))) [[[[ssssttttaaaattttiiiicccc]]]]
  718.       Sends    an event directly to a receiver, using the notify()
  719.       function. Returns the    value that was returned    from the event
  720.  
  721.  
  722.  
  723.      Page 11                         (printed 9/22/98)
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  731.  
  732.  
  733.  
  734.       handler.
  735.  
  736.       See also: postEvent()    and notify().
  737.  
  738.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeennnnddddPPPPoooosssstttteeeeddddEEEEvvvveeeennnnttttssss (((( QQQQOOOObbbbjjjjeeeecccctttt **** rrrreeeecccceeeeiiiivvvveeeerrrr,,,, iiiinnnntttt
  739.       eeeevvvveeeennnntttt____ttttyyyyppppeeee )))) [[[[ssssttttaaaattttiiiicccc]]]]
  740.       Immediately dispatches all events which have been previously
  741.       enqueued with    QApplication::postEvent() and which are    for
  742.       the object _r_e_c_e_i_v_e_r and have the _e_v_e_n_t__t_y_p_e.
  743.  
  744.       Some event compression may occur. Note that events from the
  745.       window system    are _n_o_t    dispatched by this function.
  746.  
  747.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttCCCCoooolllloooorrrrSSSSppppeeeecccc (((( iiiinnnntttt ssssppppeeeecccc    )))) [[[[ssssttttaaaattttiiiicccc]]]]
  748.       Sets the color specification for the application to _s_p_e_c.
  749.  
  750.       The color specification controls how your application
  751.       allocates colors. You    must set the color specification
  752.       before you create the    QApplication object.
  753.  
  754.       The choices are:
  755.  
  756.      strategy. Use this    choice if your application uses    buttons,
  757.      menus, texts and pixmaps with few colors. With this choice, the
  758.      application allocates system global colors. This work fine    for
  759.      most applications under X11, but Windows dithers to the 20
  760.      standard colors unless the    display    has true color support (more
  761.      than 256 colors).
  762.       QApplication::NormalColor. This is the default color allocation
  763.  
  764.  
  765.  
  766.      needs a small number of custom colors. This choice    only makes a
  767.      difference    on Windows - the application gets more colors when it
  768.      is    active,    but the    background windows look    less good. Under X11
  769.      this is the same as NormalColor. Under Windows, Qt    creates    a
  770.      Windows palette if    the display supports 256 colors.
  771.       QApplication::CustomColor. Use this choice if    your application
  772.  
  773.  
  774.  
  775.      very color    hungry (e.g. it    wants thousands    of colors). Under
  776.      Windows, this is equal to CustomColor. Under X11 the effect is:
  777.       QApplication::ManyColor. Use this choice if your application is
  778.  
  779.      visual, the default visual    is used, and a colors are allocated
  780.      from a color cube.    The color cube is the 6x6x6 (216 color)    "Web
  781.      palette", but the number of colors    can be changed by the -_n_c_o_l_s
  782.      option. The user can force    the application    to use the true    color
  783.      visual by the -visual option.
  784.       For 256-
  785.            color displays which have at best a 256 color true color
  786.  
  787.  
  788.  
  789.      Page 12                         (printed 9/22/98)
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  797.  
  798.  
  799.  
  800.      than 256 colors, use that visual. Silicon Graphics    X servers have
  801.      this feature. They    provide    an 8 bit visual    as default but can
  802.      deliver true color    when asked.
  803.       For 256-
  804.            color displays which have a true    color visual with more
  805.  
  806.       Example:
  807.  
  808.         int    main( int argc,    char **argv )
  809.         {
  810.         QApplication::setColorSpec( QApplication::ManyColor );
  811.         QApplication a(    argc, argv );
  812.         ...
  813.         }
  814.  
  815.       QColor provides more functionality for controlling color
  816.       allocation and freeing up certains colors. See
  817.       QColor::enterAllocContext() for more information.
  818.  
  819.       To see what mode you end up with, you    can call
  820.       QColor::numBitPlanes() once the QApplication object exists.
  821.       A value greater than 8 (typically 16,    24 or 32) means    true
  822.       color.
  823.  
  824.       The color cube used by Qt are    all those colors with red,
  825.       green, and blue components of    either 0x00, 0x33, 0x66, 0x99,
  826.       0xCC,    or 0xFF.
  827.  
  828.       See also: colorSpec(), QColor::numBitPlanes()    and
  829.       QColor::enterAllocContext().
  830.  
  831.       Examples:  widgets/widgets.cpp
  832.  
  833.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttDDDDoooouuuubbbblllleeeeCCCClllliiiicccckkkkIIIInnnntttteeeerrrrvvvvaaaallll (((( iiiinnnntttt mmmmssss    )))) [[[[ssssttttaaaattttiiiicccc]]]]
  834.       Sets the time    limit that distinguishes a double click    from
  835.       two consecutive mouse    clicks to _m_s milliseconds. This    value
  836.       is ignored under Windows (the    control    panel value is used.)
  837.  
  838.       The default value is 400 milliseconds.
  839.  
  840.       See also: doubleClickInterval().
  841.  
  842.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttFFFFoooonnnntttt    (((( ccccoooonnnnsssstttt    QQQQFFFFoooonnnntttt &&&&    ffffoooonnnntttt,,,, bbbboooooooollll
  843.       uuuuppppddddaaaatttteeeeAAAAllllllllWWWWiiiiddddggggeeeettttssss====FFFFAAAALLLLSSSSEEEE )))) [[[[ssssttttaaaattttiiiicccc]]]]
  844.       Changes the default application font to _f_o_n_t.
  845.  
  846.       The default font depends on the X server in use.
  847.  
  848.       If _u_p_d_a_t_e_A_l_l_W_i_d_g_e_t_s is TRUE, then the    font of    all existing
  849.       widgets is set to _f_o_n_t.
  850.  
  851.       Widgets created after    this call get _f_o_n_t as their font.
  852.  
  853.  
  854.  
  855.      Page 13                         (printed 9/22/98)
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  863.  
  864.  
  865.  
  866.       See also: font(), fontMetrics() and QWidget::setFont().
  867.  
  868.       Examples:  desktop/desktop.cpp movies/main.cpp
  869.  
  870.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttGGGGlllloooobbbbaaaallllMMMMoooouuuusssseeeeTTTTrrrraaaacccckkkkiiiinnnngggg (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
  871.       [[[[ssssttttaaaattttiiiicccc]]]]
  872.       Enables global mouse tracking    if _e_n_a_b_l_e is TRUE or disables
  873.       it if    _e_n_a_b_l_e is FALSE.
  874.  
  875.       Enabling global mouse    tracking makes it possible for widget
  876.       event    filters    or application event filters to    get all    mouse
  877.       move events, even when no button is depressed. This is
  878.       useful for special GUI elements, e.g.    tool tips.
  879.  
  880.       Global mouse tracking    does not affect    widgets    and their
  881.       mouseMoveEvent(). For    a widget to get    mouse move events when
  882.       no button is depressed, it must do
  883.       QWidget::setMouseTracking(TRUE).
  884.  
  885.       This function    has an internal    counter. Each
  886.       setGlobalMouseTracking(TRUE) must have a corresponding
  887.       setGlobalMouseTracking(FALSE).
  888.  
  889.       See also: hasGlobalMouseTracking() and
  890.       QWidget::hasMouseTracking().
  891.  
  892.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttMMMMaaaaiiiinnnnWWWWiiiiddddggggeeeetttt ((((    QQQQWWWWiiiiddddggggeeeetttt    **** mmmmaaaaiiiinnnnWWWWiiiiddddggggeeeetttt ))))
  893.       Sets the main    widget of the application.
  894.  
  895.       The special thing about the main widget is that destroying
  896.       the main widget (i.e.    the program calls QWidget::close() or
  897.       the user double-clicks the window close box) will leave the
  898.       main event loop and exit the application.
  899.  
  900.       For X11, this    function also resizes and moves    the main
  901.       widget according to the -_g_e_o_m_e_t_r_y command-line option, so
  902.       you should set the default geometry before calling
  903.       setMainWidget().
  904.  
  905.       See also: mainWidget(), exec() and quit().
  906.  
  907.       Examples:  forever/forever.cpp connect/connect.cpp
  908.       mainlyQt/editor.cpp drawdemo/drawdemo.cpp
  909.       picture/picture.cpp xform/xform.cpp menu/menu.cpp
  910.       progress/progress.cpp    cursor/cursor.cpp layout/layout.cpp
  911.       qmag/qmag.cpp    widgets/widgets.cpp
  912.  
  913.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttOOOOvvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((( ccccoooonnnnsssstttt QQQQCCCCuuuurrrrssssoooorrrr &&&& ccccuuuurrrrssssoooorrrr,,,,
  914.       bbbboooooooollll rrrreeeeppppllllaaaacccceeee====FFFFAAAALLLLSSSSEEEE )))) [[[[ssssttttaaaattttiiiicccc]]]]
  915.       Sets the application override    cursor to _c_u_r_s_o_r.
  916.  
  917.       Application override cursor are intended for showing the
  918.  
  919.  
  920.  
  921.      Page 14                         (printed 9/22/98)
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  929.  
  930.  
  931.  
  932.       user that the    application is in a special state, for example
  933.       during an operation that might take some time.
  934.  
  935.       This cursor will be displayed    in all application widgets
  936.       until    restoreOverrideCursor()    or another setOverrideCursor()
  937.       is called.
  938.  
  939.       Application cursors are stored on an internal    stack.
  940.       setOverrideCursor() pushes the cursor    onto the stack,    and
  941.       restoreOverrideCursor() pops the active cursor off the
  942.       stack. Every setOverrideCursor() must    have an    corresponding
  943.       restoreOverrideCursor(), otherwise the stack will get    out of
  944.       sync.    overrideCursor() returns 0 if the cursor stack is
  945.       empty.
  946.  
  947.       If _r_e_p_l_a_c_e is    TRUE, the new cursor will replace the last
  948.       override cursor.
  949.  
  950.       Example:
  951.  
  952.           QApplication::setOverrideCursor( waitCursor );
  953.           calculateHugeMandelbrot();          // lunch time...
  954.           QApplication::restoreOverrideCursor();
  955.  
  956.       See also: overrideCursor(), restoreOverrideCursor() and
  957.       QWidget::setCursor().
  958.  
  959.       Examples:  showimg/showimg.cpp
  960.  
  961.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttPPPPaaaalllleeeetttttttteeee (((( ccccoooonnnnsssstttt QQQQPPPPaaaalllleeeetttttttteeee &&&& ppppaaaalllleeeetttttttteeee,,,, bbbboooooooollll
  962.       uuuuppppddddaaaatttteeeeAAAAllllllllWWWWiiiiddddggggeeeettttssss====FFFFAAAALLLLSSSSEEEE )))) [[[[ssssttttaaaattttiiiicccc]]]]
  963.       Changes the default application palette to _p_a_l_e_t_t_e.
  964.  
  965.       If _u_p_d_a_t_e_A_l_l_W_i_d_g_e_t_s is TRUE, then the    palette    of all
  966.       existing widgets is set to _p_a_l_e_t_t_e.
  967.  
  968.       Widgets created after    this call get _p_a_l_e_t_t_e as their
  969.       palette.
  970.  
  971.       See also: QWidget::setPalette() and palette().
  972.  
  973.       Examples:  xform/xform.cpp
  974.  
  975.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttSSSSttttyyyylllleeee (((( GGGGUUUUIIIISSSSttttyyyylllleeee ssssttttyyyylllleeee )))) [[[[ssssttttaaaattttiiiicccc]]]]
  976.       Sets the application GUI style to _s_t_y_l_e.
  977.  
  978.       The style parameter can be WindowsStyle or MotifStyle.
  979.  
  980.       See also: style() and    QWidget::setStyle().
  981.  
  982.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttWWWWiiiinnnnSSSSttttyyyylllleeeeHHHHiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr (((( ccccoooonnnnsssstttt QQQQCCCCoooolllloooorrrr &&&& cccc ))))
  983.       [[[[ssssttttaaaattttiiiicccc]]]]
  984.  
  985.  
  986.  
  987.      PPPPaaaaggggeeee 11115555                         ((((pppprrrriiiinnnntttteeeedddd 9999////22222222////99998888))))
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  995.  
  996.  
  997.  
  998.       Sets the color used to mark selections in windows style for
  999.       all widgets in the application. Will repaint all widgets if
  1000.       the color is changed.
  1001.  
  1002.       The default color is darkBlue.
  1003.  
  1004.       See also: winStyleHighlightColor().
  1005.  
  1006.       Examples:  widgets/widgets.cpp
  1007.  
  1008.      bbbboooooooollll QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ssssttttaaaarrrrttttiiiinnnnggggUUUUpppp (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  1009.       Returns TRUE if an application object    has not    been created
  1010.       yet.
  1011.  
  1012.       See also: closingDown().
  1013.  
  1014.      GGGGUUUUIIIISSSSttttyyyylllleeee QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ssssttttyyyylllleeee (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  1015.       Returns the GUI style    of the application.
  1016.  
  1017.       See also: setStyle().
  1018.  
  1019.      vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ssssyyyynnnnccccXXXX (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  1020.       Synchronizes with the    X server in the    X11 implementation.
  1021.       Does nothing on other    platforms.
  1022.  
  1023.       See also: flushX().
  1024.  
  1025.      QQQQWWWWiiiiddddggggeeeettttLLLLiiiisssstttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ttttooooppppLLLLeeeevvvveeeellllWWWWiiiiddddggggeeeettttssss (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  1026.       Returns a list of the    top level widgets in the application.
  1027.  
  1028.       The list is created using new    and must be deleted by the
  1029.       caller.
  1030.  
  1031.       The list is empty if there are no top    level widgets.
  1032.  
  1033.       Note that some of the    top level widgets may be hidden.
  1034.  
  1035.       Example:
  1036.  
  1037.           //
  1038.           // Shows all hidden top level widgets.
  1039.           //
  1040.           QWidgetList  *list = QApplication::topLevelWidgets();
  1041.           QWidgetListIt it(    *list );      // iterate over the widgets
  1042.           while ( it.current() ) {          // for each top level    widget...
  1043.           if ( !it.current()->isVisible() )
  1044.               it.current()->show();
  1045.           ++it;
  1046.           }
  1047.           delete list;              // delete the    list, not the widgets
  1048.  
  1049.       The QWidgetList class    is defined in the qwidcoll.h header
  1050.  
  1051.  
  1052.  
  1053.      Page 16                         (printed 9/22/98)
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  1061.  
  1062.  
  1063.  
  1064.       file.
  1065.  
  1066.       WWWWaaaarrrrnnnniiiinnnngggg:::: Delete the list away    as soon    you have finished
  1067.       using    it. You    can get    in serious trouble if you for instance
  1068.       try to access    a widget that has been deleted.
  1069.  
  1070.       See also: allWidgets(), QWidget::isTopLevel(),
  1071.       QWidget::isVisible() and QList::isEmpty().
  1072.  
  1073.      QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::wwwwiiiiddddggggeeeettttAAAAtttt ((((    iiiinnnntttt xxxx,,,, iiiinnnntttt yyyy,,,, bbbboooooooollll cccchhhhiiiilllldddd====FFFFAAAALLLLSSSSEEEE
  1074.       )))) [[[[ssssttttaaaattttiiiicccc]]]]
  1075.       Returns a pointer to the widget at global screen position
  1076.       (_x,_y), or a null pointer if there is no Qt widget there.
  1077.  
  1078.       If _c_h_i_l_d is FALSE and    there is a child widget    at position
  1079.       (_x,_y), the top-level widget containing it is returned. If
  1080.       _c_h_i_l_d    is TRUE    the child widget at position (_x,_y) is
  1081.       returned.
  1082.  
  1083.       See also: QCursor::pos(), QWidget::grabMouse() and
  1084.       QWidget::grabKeyboard().
  1085.  
  1086.      QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::wwwwiiiiddddggggeeeettttAAAAtttt ((((    ccccoooonnnnsssstttt QQQQPPPPooooiiiinnnntttt &&&& ppppoooossss,,,, bbbboooooooollll
  1087.       cccchhhhiiiilllldddd====FFFFAAAALLLLSSSSEEEE ))))    [[[[ssssttttaaaattttiiiicccc]]]]
  1088.       This is an overloaded    member function, provided for
  1089.       convenience. It differs from the above function only in what
  1090.       argument(s) it accepts.
  1091.  
  1092.      ccccoooonnnnsssstttt QQQQCCCCoooolllloooorrrr&&&& QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::wwwwiiiinnnnSSSSttttyyyylllleeeeHHHHiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr    (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
  1093.       Returns the color used to mark selections in windows style.
  1094.  
  1095.       See also: setWinStyleHighlightColor().
  1096.  
  1097.      RRRREEEELLLLAAAATTTTEEEEDDDD FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  1098.      vvvvooooiiiidddd qqqqAAAAddddddddPPPPoooossssttttRRRRoooouuuuttttiiiinnnneeee ((((CCCClllleeeeaaaannnnUUUUppppFFFFuuuunnnnccccttttiiiioooonnnn pppp))))
  1099.       Adds a global    routine    that will be called from the
  1100.       QApplication destructor. This    function is normally used to
  1101.       add cleanup routines.
  1102.  
  1103.       CleanUpFunctions is defined as  typedef void
  1104.       (*CleanUpFunction)();    , i.e. a pointer to a function that
  1105.       takes    no arguments and returns nothing.
  1106.  
  1107.       Example of use:
  1108.  
  1109.           static int *global_ptr = 0;
  1110.           void cleanup_ptr()
  1111.           {
  1112.           delete [] global_ptr;
  1113.           }
  1114.           void init_ptr()
  1115.           {
  1116.  
  1117.  
  1118.  
  1119.      Page 17                         (printed 9/22/98)
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  1127.  
  1128.  
  1129.  
  1130.           global_ptr = new int[100];          // allocate data
  1131.           qAddPostRoutine( cleanup_ptr );      // delete later
  1132.           }
  1133.  
  1134.      ccccoooonnnnsssstttt cccchhhhaaaarrrr    **** qqqqVVVVeeeerrrrssssiiiioooonnnn (((())))
  1135.       Returns the Qt version number    for the    library, typically
  1136.       "1.30" or "1.31".
  1137.  
  1138.      bbbboooooooollll qqqqSSSSyyyyssssIIIInnnnffffoooo ((((iiiinnnntttt    **** wwwwoooorrrrddddSSSSiiiizzzzeeee,,,, bbbboooooooollll **** bbbbiiiiggggEEEEnnnnddddiiiiaaaannnn))))
  1139.       Obtains information about the    system.
  1140.  
  1141.       The system's word size in bits (typically 32)    is returned in
  1142.       *_w_o_r_d_S_i_z_e. The *_b_i_g_E_n_d_i_a_n is set to TRUE if this is a    big-
  1143.       endian machine, or to    FALSE if this is a little-endian
  1144.       machine.
  1145.  
  1146.       This function    calls fatal() with a message if    the computer
  1147.       is truely weird (i.e.    different endianness for 16 bit    and 32
  1148.       bit integers).
  1149.  
  1150.      vvvvooooiiiidddd ddddeeeebbbbuuuugggg    ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr **** mmmmssssgggg,,,, ............))))
  1151.       Prints a debug message, or calls the message handler (if it
  1152.       has been installed).
  1153.  
  1154.       This function    takes a    format string and a stack arguments,
  1155.       similar to the C printf() function.
  1156.  
  1157.       Example:
  1158.  
  1159.           debug( "my window    handle = %x", myWidget->id() );
  1160.  
  1161.       Under    X11, the text is printed to stderr. Under Windows, the
  1162.       text is sent to the debugger.
  1163.  
  1164.       WWWWaaaarrrrnnnniiiinnnngggg:::: The internal    buffer is limited to 512 bytes
  1165.       (including the 0-terminator.
  1166.  
  1167.       See also: warning(), fatal(),    qInstallMsgHandler() and
  1168.       Debugging
  1169.  
  1170.      vvvvooooiiiidddd wwwwaaaarrrrnnnniiiinnnngggg ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****    mmmmssssgggg,,,, ............))))
  1171.       Prints a warning message, or calls the message handler (if
  1172.       it has been installed).
  1173.  
  1174.       This function    takes a    format string and a stack arguments,
  1175.       similar to the C printf() function.
  1176.  
  1177.       Example:
  1178.  
  1179.           void f( int c )
  1180.           {
  1181.           if ( c > 200 )
  1182.  
  1183.  
  1184.  
  1185.      Page 18                         (printed 9/22/98)
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  1193.  
  1194.  
  1195.  
  1196.               warning( "f: bad argument, c == %d", c );
  1197.           }
  1198.  
  1199.       Under    X11, the text is printed to stderr. Under Windows, the
  1200.       text is sent to the debugger.
  1201.  
  1202.       WWWWaaaarrrrnnnniiiinnnngggg:::: The internal    buffer is limited to 512 bytes
  1203.       (including the 0-terminator.
  1204.  
  1205.       See also: debug(), fatal(), qInstallMsgHandler() and
  1206.       Debugging
  1207.  
  1208.       Examples:  progress/progress.cpp
  1209.  
  1210.      vvvvooooiiiidddd ffffaaaattttaaaallll    ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr **** mmmmssssgggg,,,, ............))))
  1211.       Prints a fatal error message and exits, or calls the message
  1212.       handler (if it has been installed).
  1213.  
  1214.       This function    takes a    format string and a stack arguments,
  1215.       similar to the C printf() function.
  1216.  
  1217.       Example:
  1218.  
  1219.           int divide( int a, int b )
  1220.           {
  1221.           if ( b == 0 )                  // program error
  1222.               fatal( "divide: cannot divide by zero" );
  1223.           return a/b;
  1224.           }
  1225.  
  1226.       Under    X11, the text is printed to stderr. Under Windows, the
  1227.       text is sent to the debugger.
  1228.  
  1229.       WWWWaaaarrrrnnnniiiinnnngggg:::: The internal    buffer is limited to 512 bytes
  1230.       (including the 0-terminator.
  1231.  
  1232.       See also: debug(), warning(),    qInstallMsgHandler() and
  1233.       Debugging
  1234.  
  1235.      vvvvooooiiiidddd AAAASSSSSSSSEEEERRRRTTTT ((((bbbboooooooollll tttteeeesssstttt))))
  1236.       Prints a warning message containing the source code file
  1237.       name and line    number if _t_e_s_t is FALSE.
  1238.  
  1239.       This is really a macro defined in qglobal.h.
  1240.  
  1241.       ASSERT is useful for testing required    conditions in your
  1242.       program.
  1243.  
  1244.       Example:
  1245.  
  1246.           //
  1247.           // File: div.cpp
  1248.  
  1249.  
  1250.  
  1251.      Page 19                         (printed 9/22/98)
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  1259.  
  1260.  
  1261.  
  1262.           //
  1263.           #include <qglobal.h>
  1264.           int divide( int a, int b )
  1265.           {
  1266.           ASSERT( b != 0 );              // this is line 9
  1267.           return a/b;
  1268.           }
  1269.  
  1270.       If b is zero,    the ASSERT statement will output the following
  1271.       message using    the warning() function:
  1272.  
  1273.           ASSERT: "b == 0" in div.cpp (9)
  1274.  
  1275.       See also: warning() and Debugging
  1276.  
  1277.      vvvvooooiiiidddd CCCCHHHHEEEECCCCKKKK____PPPPTTTTRRRR ((((vvvvooooiiiidddd **** pppp))))
  1278.       If _p is null,    a fatal    messages says that the program ran out
  1279.       of memory and    exits. If _p is not null, nothing happens.
  1280.  
  1281.       This is really a macro defined in qglobal.h.
  1282.  
  1283.       WWWWaaaarrrrnnnniiiinnnngggg:::: CHECK_PTR only works    for the    development release of
  1284.       the Qt library. In the release library, CHECK_PTR will be
  1285.       substituted with nothing.
  1286.  
  1287.       Example:
  1288.  
  1289.           int *a;
  1290.           CHECK_PTR( a = new int[80] );      // never do this!
  1291.         // do this instead:
  1292.           a    = new int[80];
  1293.           CHECK_PTR( a );              // this is fine
  1294.  
  1295.       See also: fatal() and    Debugging
  1296.  
  1297.      mmmmssssgggg____hhhhaaaannnnddddlllleeeerrrr qqqqIIIInnnnssssttttaaaallllllllMMMMssssggggHHHHaaaannnnddddlllleeeerrrr ((((mmmmssssgggg____hhhhaaaannnnddddlllleeeerrrr hhhh))))
  1298.       Installs a Qt    message    handler. Returns a pointer to the
  1299.       message handler previously defined.
  1300.  
  1301.       The message handler is a function that prints    out debug
  1302.       messages, warnings and fatal error messages. The Qt library
  1303.       (debug version) contains hundreds of warning messages    that
  1304.       are printed when internal errors (usually invalid function
  1305.       arguments) occur. If you implement your own message handler,
  1306.       you get total    control    of these messages.
  1307.  
  1308.       The default message handler prints the message to the
  1309.       standard output under    X11 or to the debugger under Windows.
  1310.       If it    is a fatal message, the    application aborts
  1311.       immediately.
  1312.  
  1313.       Only one message handler can be defined, since this is
  1314.  
  1315.  
  1316.  
  1317.      Page 20                         (printed 9/22/98)
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.      QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))    TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888))))  QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
  1325.  
  1326.  
  1327.  
  1328.       usually done on an application-wide basis to control debug
  1329.       output.
  1330.  
  1331.       To restore the message handler, call qInstallMsgHandler(0).
  1332.  
  1333.       Example:
  1334.  
  1335.           #include <qapplication.h>
  1336.           #include <stdio.h>
  1337.           #include <stdlib.h>
  1338.           void myMessageOutput( QtMsgType type, const char *msg )
  1339.           {
  1340.           switch ( type    ) {
  1341.               case QtDebugMsg:
  1342.               fprintf( stderr, "Debug: %s\n", msg );
  1343.               break;
  1344.               case QtWarningMsg:
  1345.               fprintf( stderr, "Warning: %s\n", msg    );
  1346.               break;
  1347.               case QtFatalMsg:
  1348.               fprintf( stderr, "Fatal: %s\n", msg );
  1349.               abort();              // dump core on purpose
  1350.           }
  1351.           }
  1352.           int main(    int argc, char **argv )
  1353.           {
  1354.           qInstallMsgHandler( myMessageOutput );
  1355.           QApplication a( argc,    argv );
  1356.           ...
  1357.           return a.exec();
  1358.           }
  1359.  
  1360.       See also:  debug(), warning(), fatal() and Debugging
  1361.  
  1362.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  1363.       hhhhttttttttpppp::::////////wwwwwwwwwwww....ttttrrrroooollllllll....nnnnoooo////qqqqtttt////qqqqaaaapppppppplllliiiiccccaaaattttiiiioooonnnn....hhhhttttmmmmllll
  1364.  
  1365.      CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
  1366.       Copyright 1992-1997 Troll Tech AS.  See the LICENSE file
  1367.       included in the distribution for a complete license
  1368.       statement.
  1369.  
  1370.      AAAAUUUUTTTTHHHHOOOORRRR
  1371.       Generated automatically from the source code.
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.      Page 21                         (printed 9/22/98)
  1384.  
  1385.  
  1386.  
  1387.